package com.hlkj.baojin.constant.enums;

public enum SmsTypeEnum {
    //XXXXXXX企业XXXXXX位置XXXXXX设备报警，报警内容：XXXXX（安全值）
    ALARM_TO_ADMIN("SMS_156465034","{\"para1\":\"{para1}\",\"para2\":\"{para2}\",\"para3\":\"{para3}\"}",
            "{para1}监控设备报警，位置:{para2}，报警内容：{para3}, 请尽快核实报警原因。【海梁科技提醒】"),
    ALARM_TO_COMPANY("SMS_156470031","{\"para1\":\"{para1}\",\"para2\":\"{para2}\",\"para3\":\"{para3}\",\"para4\":\"{para4}\"}",
            "贵公司{para1}监控设备报警，位置:{para2}，报警内容：{para3}，请立即落实处置, {para4}请及时上报主管部门。【海梁科技提醒】"),
    EARLY_ALARM_TO_ADMIN("SMS_156466341","{\"para1\":\"{para1}\",\"para2\":\"{para2}\",\"para3\":\"{para3}\"}",
            "{para1}监控设备预警，位置:{para2}，预警内容：{para3}, 请尽快核实预警原因。【海梁科技提醒】"),
    EARLY_ALARM_TO_COMPANY("SMS_156470465","{\"para1\":\"{para1}\",\"para2\":\"{para2}\",\"para3\":\"{para3}\",\"para4\":\"{para4}\"}",
            "贵公司{para1}监控设备预警，位置:{para2}，预警内容：{para3}，请立即落实处置, {para4}请及时上报主管部门。【海梁科技提醒】"),
    USER_SET_UP("SMS_153326413", "{\"para1\":\"{para1}\"}","您在企业安全生产报警系统的账号已开通，登录账号为当前手机号，初始密码为{para1}，请及时登录平台修改密码。【海梁科技提醒】"),
    //SECURITY_CODE("SMS_142145590","{\"para1\":\"{para1}\", \"para2\":\"{para2}\"}","验证码{para1}将用于{para2}重置密码，请勿泄露短信验证码，如非本人操作请及时登录并修改密码。"),
    SECURITY_CODE("SMS_142145590","{\"msg\":\"{para1}\", \"phone\":\"{para2}\"}","核验码{para1}将用于{para2}重置密码，请勿泄露短信验证码，如非本人操作请及时登录并修改密码。【海梁科技提醒】"),
    ;

    private String code;
    private String aliMsg;
    private String masMsg;

    SmsTypeEnum(String code, String aliMsg, String masMsg) {
        this.code = code;
        this.aliMsg = aliMsg;
        this.masMsg = masMsg;
    }

    public String getCode() {
        return code;
    }

    public String getAliString(String... paras) {
        String dataRespasll = "{para";
        String msg = aliMsg;
        for (int i = 0; i < paras.length; i++) {
            msg = msg.replace((dataRespasll + (i + 1)) + "}", paras[i]);
        }
        return msg;
    }
    public String getMasMsgString(String... paras) {
        String dataRespasll = "{para";
        String msg = masMsg;
        for (int i = 0; i < paras.length; i++) {
            msg = msg.replace((dataRespasll + (i + 1)) + "}", paras[i]);
        }
        return msg;
    }
}
